import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import SearchBox from './components/SearchBox';
import NavigationBar from  "./components/NavigationBar";

class App extends Component {
  constructor(props){
    super(props)

    this.state = {
      message:""
    }
  }

  receiveMessage=(message)=>{
    console.log(message)
    this.setState({
      message:message
    })
  }
包容性匹配规则

/home
/
/home
/about
  render() {
    return (
      <div className="App">
        <SearchBox sendMessage={this.receiveMessage}/> 
        <NavigationBar title={this.state.message}/>
        <div>{this.state.message}</div>
      </div>
    );
  }
}

export default App;
